home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / ubmark / cache.c next >
Text File  |  1996-07-10  |  823b  |  36 lines

  1. /*******************************************************************
  2. *    cache.c
  3. *    output file:     cache.exe
  4. *    programmer:    Michael Day
  5. *    copyright:    Michael Day, 1990; LAN TIMES, 1990
  6. *
  7. *    child process that creates a file to fill the machine's
  8. *    drive controller cache, thus removing the controller
  9. *    cache as a factor in measuring drive performance
  10. *
  11. *    place in /bin directory
  12. ********************************************************************/
  13.  
  14. #include <stdio.h>
  15.  
  16. main()    {
  17.  
  18.     
  19.     int i;
  20.     FILE     *source, *dest;
  21.     char     inchar, outchar;
  22.  
  23.     printf("Copying 10MB file in background. . .\n");
  24.     for(;1 != 2;)    {
  25.         source = fopen("source.txt", "rb");    
  26.         dest = fopen("dest.txt" , "wb");
  27.         while ((inchar = getc(source)) != EOF)
  28.             putc(inchar, dest);
  29.         fclose(dest);
  30.         /*remove(dest);*/
  31.         }
  32.         
  33.     
  34.  
  35.